// Kony


#include "AbilitySystem/Data/AttributeInfo.h"

#include "GASC_HuanLing/BaseLogChannels.h"

FBaseAttributeInfo UAttributeInfo::FindAttributeInfoForTag(const FGameplayTag& AttributeTag, bool bLogNotFound) const
{
	for (const FBaseAttributeInfo& Info : AttributeInformation)
	{
		//循环找到Tag对应的属性
		if (Info.AttributeTag == AttributeTag)
		{
			return Info ;
		}
	}
	if (bLogNotFound)
	{
		//如果为空打印日志
		UE_LOG(LogHuanYue, Error, TEXT("Could not find Info for AttributeTag [%s] on  AttributeInfo for Tag %s")
			,*AttributeTag.ToString(), *GetNameSafe(this));
	}
	//如果没找到信息则返回空的结构体
	return FBaseAttributeInfo();
}
